package com.djinfo.work.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 菜单表表
 * 
 * @author wxf
 *
 */
@Entity
@Table(name = "tb_sys_menu")
public class TbSysMenu implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private String pkMenuId;// 权限ID
	private String menuName;// 权限名称
	private String menuDesc; // 权限描述
	private String menuValue;// 权限值
	private int level; // 权限层级
	private String parentAuthId; // 父权限ID
	private String pageUrl; // 页面路径
	private String pageElement; // 页面元素名称
	private int elementIndex; // 数组元素索引号
	private String parentMenuName;
	private String createTime;//创建时间
	private String updateTime;//修改时间
	private String createUser;
	private String updateUser;
	private String isLeaf;//是否是叶子菜单
	@Column(name = "is_leaf")
	public String getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(String isLeaf) {
		this.isLeaf = isLeaf;
	}

	@Column(name = "create_user")
	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	@Column(name = "update_user")
	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	@Column(name = "create_time")
	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	@Column(name = "update_time")
	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Transient
	public String getParentMenuName() {
		return parentMenuName;
	}

	public void setParentMenuName(String parentMenuName) {
		this.parentMenuName = parentMenuName;
	}

	public TbSysMenu() {
	}

	public TbSysMenu(String menuName, String menuDesc, String menuValue, int level,
					 String pageElement, int elementIndex) {
		this.menuName = menuName;
		this.menuDesc = menuDesc;
		this.menuValue = menuValue;
		this.level = level;
		this.pageElement = pageElement;
		this.elementIndex = elementIndex;
	}

	public TbSysMenu(String menuName, String menuDesc, String menuValue, int level,
					 String parentAuthId, String pageUrl, String pageElement, int elementIndex
			) {
		this.menuName = menuName;
		this.menuDesc = menuDesc;
		this.menuValue = menuValue;
		this.level = level;
		this.parentAuthId = parentAuthId;
		this.pageUrl = pageUrl;
		this.pageElement = pageElement;
		this.elementIndex = elementIndex;
	}

	@Id
	@Basic(optional = false)
	@GeneratedValue(generator = "id")
	@GenericGenerator(name = "id", strategy = "uuid")
	@Column(name = "id", unique = true, nullable = false)
	public String getPkMenuId() {
		return this.pkMenuId;
	}

	public void setPkMenuId(String pkMenuId) {
		this.pkMenuId = pkMenuId;
	}

	@Column(name = "menu_name", nullable = false, length = 50)
	public String getMenuName() {
		return this.menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	@Column(name = "menu_description")
	public String getMenuDesc() {
		return this.menuDesc;
	}

	public void setMenuDesc(String menuDesc) {
		this.menuDesc = menuDesc;
	}

	@Column(name = "menu_value", length = 255)
	public String getMenuValue() {
		return menuValue;
	}

	public void setMenuValue(String menuValue) {
		this.menuValue = menuValue;
	}

	@Column(name = "level")
	public int getLevel() {
		return this.level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	@Column(name = "parent_auth_id")
	public String getParentAuthId() {
		return this.parentAuthId;
	}

	public void setParentAuthId(String parentAuthId) {
		this.parentAuthId = parentAuthId;
	}

	@Column(name = "page_url")
	public String getPageUrl() {
		return this.pageUrl;
	}

	public void setPageUrl(String pageUrl) {
		this.pageUrl = pageUrl;
	}

	@Column(name = "page_element", nullable = false)
	public String getPageElement() {
		return this.pageElement;
	}

	public void setPageElement(String pageElement) {
		this.pageElement = pageElement;
	}

	@Column(name = "element_index", nullable = false)
	public int getElementIndex() {
		return this.elementIndex;
	}

	public void setElementIndex(int elementIndex) {
		this.elementIndex = elementIndex;
	}


}
